import request from '@/utils/request'

export const getPermissionListAPI = () => {
  return request.get(`/sys/permission`)
}

// 获取权限详情
export const getPermissionDetailAPI = (id) => {
  return request.get(`/sys/permission/${id}`)
}

// 添加权限
export const addPermissionAPI = (data) => {
  return request.post(`/sys/permission`, data)
}

// 添加权限
export const delPermissionAPI = (id) => {
  return request.delete(`/sys/permission/${id}`)
}

// 添加权限
export const editPermissionAPI = (data) => {
  return request.put(`/sys/permission/${data.id}`, data)
}
